import redRequest from '..';
import { IResponseDataType } from '../type';

enum dashboardAPI {
  amountList = '/goods/amount/list',
  categoryGoodsCount = '/goods/category/count',
  categoryGoodsSale = '/goods/category/sale',
  categoryGoodsFavor = '/goods/category/favor',
  addressGoodsSale = '/goods/address/sale'
}

export function getAmountList() {
  return redRequest.get<IResponseDataType>({
    url: dashboardAPI.amountList
  });
}

export function requestCategoryGoodsCount() {
  return redRequest.get<IResponseDataType>({
    url: dashboardAPI.categoryGoodsCount
  });
}

export function requestCategoryGoodsSale() {
  return redRequest.get<IResponseDataType>({
    url: dashboardAPI.categoryGoodsSale
  });
}

export function requestCategoryGoodsFavor() {
  return redRequest.get<IResponseDataType>({
    url: dashboardAPI.categoryGoodsFavor
  });
}
export function requestAddressGoodsSale() {
  return redRequest.get<IResponseDataType>({
    url: dashboardAPI.addressGoodsSale
  });
}
